package com.zb.entity.dto;

import com.zb.entity.ZjAdmLogistics;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.Date;

/**
 * @Author WEN
 * @Date 2023/7/11 0011
 **/
@Data
@ApiModel("物流列表实体")
public class LogisticsList {
    @ApiModelProperty(value = "主健ID")
    private Long id;

    @ApiModelProperty(value = "物流类型：1-国内、2-国外")
    private Integer type;

    @ApiModelProperty(value = "物流名称")
    private String name;

    @ApiModelProperty(value = "物流编码")
    private String code;

    @ApiModelProperty(value = "是否禁用：false-否，true-是")
    private Boolean disabled;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    public static LogisticsList beanToDto(ZjAdmLogistics admLogistics) {
        LogisticsList s = new LogisticsList();
        BeanUtils.copyProperties(admLogistics, s);
        s.setCreateTime(admLogistics.getGmtCreate());
        s.setUpdateTime(admLogistics.getGmtUpdate());
        return s;
    }


}
